package org.dromara.hm.domain.vo;

import java.math.BigDecimal;
import java.util.Date;

import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.hm.domain.HmPaymentAdjustment;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 回款调整记录视图对象 hm_payment_adjustment
 *
 * @author Claude Code
 * @date 2025-01-16
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = HmPaymentAdjustment.class)
public class HmPaymentAdjustmentVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 调整记录ID
     */
    @ExcelProperty(value = "调整记录ID")
    private Long adjustmentId;

    /**
     * 销售订单ID
     */
    @ExcelProperty(value = "销售订单ID")
    private Long saleId;

    /**
     * 客户名称（通过订单关联）
     */
    private String customerName;

    /**
     * 订单金额（冗余显示）
     */
    private BigDecimal saleAmount;

    /**
     * 调整类型：DEBT_RELIEF=债务减免, ERROR_CORRECTION=错误修正, BAD_DEBT=坏账核销, AGING_ADJUSTMENT=账龄调整, DEBT_RESTRUCTURE=债务重组, OTHER=其他
     */
    @ExcelProperty(value = "调整类型")
    private String adjustmentType;

    /**
     * 调整类型描述
     */
    private String adjustmentTypeDesc;

    /**
     * 调整金额（正数=减少未回款，负数=增加未回款）
     */
    @ExcelProperty(value = "调整金额")
    private BigDecimal adjustmentAmount;

    /**
     * 调整前未回款金额
     */
    @ExcelProperty(value = "调整前未回款金额")
    private BigDecimal originalUnpaidAmount;

    /**
     * 调整后未回款金额
     */
    @ExcelProperty(value = "调整后未回款金额")
    private BigDecimal newUnpaidAmount;

    /**
     * 原因代码
     */
    @ExcelProperty(value = "原因代码")
    private String reasonCode;

    /**
     * 详细说明
     */
    @ExcelProperty(value = "详细说明")
    private String description;

    /**
     * 证明材料文件路径（多个用逗号分隔）
     */
    @ExcelProperty(value = "证明材料")
    private String proofFiles;

    /**
     * 申请时间
     */
    @ExcelProperty(value = "申请时间")
    private Date applyTime;

    /**
     * 申请人ID
     */
    private Long applicantId;

    /**
     * 申请人姓名
     */
    @ExcelProperty(value = "申请人")
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "applicantId")
    private String applicantName;

    /**
     * 状态：PENDING=待审核, APPROVED=已批准, REJECTED=已驳回, CANCELLED=已取消
     */
    @ExcelProperty(value = "状态")
    private String status;

    /**
     * 状态描述
     */
    private String statusDesc;

    /**
     * 审核人ID
     */
    private Long approverId;

    /**
     * 审核人姓名
     */
    @ExcelProperty(value = "审核人")
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "approverId")
    private String approverName;

    /**
     * 审核时间
     */
    @ExcelProperty(value = "审核时间")
    private Date approveTime;

    /**
     * 审核备注
     */
    @ExcelProperty(value = "审核备注")
    private String approveRemark;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 备注
     */
    private String remark;
}
